<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
//打印平行四边形
var m = prompt("请输入平行四边形的高:");
var n = prompt("请输入平行四边形的长:");
if (m < 2 || n < 2) {
    alert("长和高任意一个都不能小于2,请重新输入");
} else {
    for (var i = 0; i < m; i++) {
        for (var j = 0; j < m - i; j++) {
            document.write(`<span style="display:inline-block;width:20px;"></span>`);
        }
        for (var k = 0; k < n; k++) {
            document.write(`<span style="display:inline-block;width:20px;">*</span>`);
        }
        document.write("<br>");
    }
}
    </script>

</body>
</html>